From d994f818463594643d00d3f9383a76b0ad4dd8b7 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 17 Jun 2006 08:56:02 +0100 Subject: [PATCH] [LINUX] Fix dependencies on CONFIG_PROC_FS. Signed-off-by: Horms --- linux-2.6-xen-sparse/drivers/xen/Kconfig | 10 ++++++++++ linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c | 6 ++++++ linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile | 2 +- linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile | 2 +- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 4 ++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/Kconfig b/linux-2.6-xen-sparse/drivers/xen/Kconfig index dde5ca154d..6124dda0f0 100644 --- a/linux-2.6-xen-sparse/drivers/xen/Kconfig +++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig @@ -28,6 +28,11 @@ config XEN_UNPRIVILEGED_GUEST bool default !XEN_PRIVILEGED_GUEST +config XEN_PRIVCMD + bool + depends on PROC_FS + default y + config XEN_BACKEND tristate "Backend driver support" default y @@ -84,6 +89,11 @@ config XEN_BLKDEV_BACKEND block devices to other guests via a high-performance shared-memory interface. +config XEN_XENBUS_DEV + bool + depends on PROC_FS + default y + config XEN_NETDEV_BACKEND tristate "Network-device backend driver" depends on XEN_BACKEND && NET diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index da1a7eca1c..b8aca26778 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -58,7 +58,9 @@ #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) +#ifdef CONFIG_PROC_FS static struct proc_dir_entry *balloon_pde; +#endif static DECLARE_MUTEX(balloon_mutex); @@ -403,6 +405,7 @@ static int balloon_init_watcher(struct notifier_block *notifier, return NOTIFY_DONE; } +#ifdef CONFIG_PROC_FS static int balloon_write(struct file *file, const char __user *buffer, unsigned long count, void *data) { @@ -456,6 +459,7 @@ static int balloon_read(char *page, char **start, off_t off, *eof = 1; return len; } +#endif static struct notifier_block xenstore_notifier; @@ -481,6 +485,7 @@ static int __init balloon_init(void) balloon_timer.data = 0; balloon_timer.function = balloon_alarm; +#ifdef CONFIG_PROC_FS if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL) { WPRINTK("Unable to create /proc/xen/balloon.\n"); return -1; @@ -488,6 +493,7 @@ static int __init balloon_init(void) balloon_pde->read_proc = balloon_read; balloon_pde->write_proc = balloon_write; +#endif /* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile b/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile index e21869553c..de090ba6be 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile @@ -1,2 +1,2 @@ -obj-y := privcmd.o +obj-$(CONFIG_XEN_PRIVCMD) := privcmd.o diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile b/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile index 899cc3133d..d7c7d05172 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile @@ -9,4 +9,4 @@ xenbus-objs += xenbus_client.o xenbus-objs += xenbus_comms.o xenbus-objs += xenbus_xs.o xenbus-objs += xenbus_probe.o -xenbus-objs += xenbus_dev.o +obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 137529b79b..454f1a1eee 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -926,6 +926,7 @@ void xenbus_probe(void *unused) } +#ifdef CONFIG_PROC_FS static struct file_operations xsd_kva_fops; static struct proc_dir_entry *xsd_kva_intf; static struct proc_dir_entry *xsd_port_intf; @@ -964,6 +965,7 @@ static int xsd_port_read(char *page, char **start, off_t off, *eof = 1; return len; } +#endif static int __init xenbus_probe_init(void) @@ -1008,6 +1010,7 @@ static int __init xenbus_probe_init(void) BUG_ON(err); xen_start_info->store_evtchn = alloc_unbound.port; +#ifdef CONFIG_PROC_FS /* And finally publish the above info in /proc/xen */ xsd_kva_intf = create_xen_proc_entry("xsd_kva", 0600); if (xsd_kva_intf) { @@ -1020,6 +1023,7 @@ static int __init xenbus_probe_init(void) xsd_port_intf = create_xen_proc_entry("xsd_port", 0400); if (xsd_port_intf) xsd_port_intf->read_proc = xsd_port_read; +#endif } else xenstored_ready = 1; -- 2.30.2